import math as m
from scipy.stats import beta
import numpy as np
import random
import math

class getS:
    def __init__(self,IVq,q):

        self.data=IVq
        self.q=q
        self.list_function = [self.s,self.f2]

    def getScore(self,numb=0):
        try:
            return self.list_function[numb]()
        except:
            print("下标索引的距离公式不存在")
            return self.list_function[0]()


    def s(self):

        a=self.data[0][0]**self.q
        b=self.data[0][1]**self.q
        c=self.data[1][0]**self.q
        d=self.data[1][1]**self.q

        return (a+b-c-d)/2


    def f0(self):
        '''
        :param IVq_ROF: 广义正交数
        :param q:
         :return:
        '''
        a = self.data[0][0] ** self.q
        b = self.data[0][1] ** self.q
        c = self.data[1][0] ** self.q
        d = self.data[1][1] ** self.q
        score = ((abs(a - c) ** (1 / self.q) + abs(b - d) ** (1 / self.q)) / 2) + 1
        # Accaurate=(b-a)**(1/q)+(d-c)**(1/q)
        return (score / 2)


    def f1(self):
        '''

        :param IVq_ROF: 广义正交数
        :param q:
        :return:
        '''
        a = self.data[0][0]
        b = self.data[0][1]
        c = self.data[1][0]
        d = self.data[1][1]
        score = ((a + b) * (a + c) - (c + d) * (b + d)) / 2
        return score


    def f2(self):
        '''

        :param IVq_ROF: 广义正交数
        :param q:
        :return:
        '''
        a = self.data[0][0]
        b = self.data[0][1]
        c = self.data[1][0]
        d = self.data[1][1]
        score = a + b * (1 - a - c) + b + a * (1 - b - d)
        return score


    def f3(self):
        a = self.data[0][0] ** self.q
        b = self.data[0][1] ** self.q
        c = self.data[1][0] ** self.q
        d = self.data[1][1] ** self.q
        score = (a - c) * ((1 - a - c) ** (1 / self.q)) + (b - d) * ((1 - b - d) ** (1 / self.q)) + abs(a - c) + abs(b - d)
        return score / 2


    def f4(self):
        a = self.data[0][0]
        b = self.data[0][1]
        c = self.data[1][0]
        d = self.data[1][1]
        score = (1 / 2) * (a ** self.q + b ** self.q - c ** self.q - d ** self.q)
        return (score + 1) / 2


    def f5(self):
        a = self.data[0][0]
        b = self.data[0][1]
        c = self.data[1][0]
        d = self.data[1][1]
        score = a - c + b - d + (1 - a - c ** self.q) ** (1 / self.q) + (1 - b ** self.q - d ** self.q) ** (1 / self.q)

        print((score) / 2)
        return (score) / 2


    def f6(self):
        a = self.data[0][0]
        b = self.data[0][1]
        c = self.data[1][0]
        d = self.data[1][1]
        pai1 = (1 - a ** self.q - c ** self.q) ** (1 / self.q)
        pai2 = (1 - b ** self.q - d ** self.q) ** (1 / self.q)
        score = a + b + c + d + m.cos((b - a) * (m.pi / 2)) + m.cos((d - c) * (m.pi / 2)) + m.sin(
            (a - c) * (m.pi / 2)) + m.sin((b - d) * (m.pi / 2))
        score = (score - 2) / 4

        return score



    def f7(self):
        a = self.data[0][0]
        b = self.data[0][1]
        c = self.data[1][0]
        d = self.data[1][1]
        if a == 0:
            pai1 = (1 - 0 - c ** self.q) ** (1 / self.q)
            pai2 = (1 - b ** self.q - d ** self.q) ** (1 / self.q)
        if b == 0:
            pai1 = (1 - a ** self.q - c ** self.q) ** (1 / self.q)
            pai2 = (1 - 0 - d ** self.q) ** (1 / self.q)
        if c == 0:
            pai1 = (1 - a ** self.q - 0) ** (1 / self.q)
            pai2 = (1 - b ** self.q - 0) ** (1 / self.q)
        if d == 0:
            pai1 = (1 - a ** self.q - 0) ** (1 / self.q)
            pai2 = (1 - b ** self.q - 0) ** (1 / self.q)

        if c != 0 and a != 0 and b != 0 and d != 0:
            pai1 = (1 - a ** self.q - c ** self.q) ** (1 / self.q)
            pai2 = (1 - b ** self.q - d ** self.q) ** (1 / self.q)
        score = ((a + b + c + d) + (pai1 + pai2)) + 4 * (
                    m.cos((b + c - a - d) * (m.pi / 4)) * m.cos((d - a + 1) * (m.pi / 4)) * m.cos((c - b + 1) * (m.pi / 4)))
        # score=round(score,5)
        return (score - 4) / 4

    def qTest1(self):
        '''
        1、广义正交模糊集的得分函数（2020） 只有u和v
        :param q_ROFs:
        :param q:
        :return:
        '''
        a = self.data[0][0]
        b = self.data[0][1]
        c = self.data[1][0]
        d = self.data[1][1]
        pai = (1 - a**self.q - c**self.q)**(1/self.q)
        score = (math.e**(a**self.q-c**self.q))/(1+pai**self.q)
        return score

    def qTest2(self):
        '''
        1、广义正交模糊集的得分函数（2020）第2种 只有u和v
        :param q_ROFs:
        :param q:
        :return:
        '''
        a = self.data[0][0]
        b = self.data[0][1]
        c = self.data[1][0]
        d = self.data[1][1]
        pai = (1 - a**self.q - c**self.q)**(1/self.q)
        temp = (math.e**(a**self.q-c**self.q))/(math.e**(a**self.q-c**self.q)+1)
        score = a**self.q-c**self.q+(temp-1/2)*(pai**self.q)
        return score

    def test2(self):
        '''
        2、区间值直觉模糊集的度量方法（王中兴 ，牛利利，2013年）
        :param IVq_ROF:
        :param q:
        :return:
        '''
        a = self.data[0][0]
        b = self.data[0][1]
        c = self.data[1][0]
        d = self.data[1][1]
        score = 1.0/2*(a**self.q+b**self.q-c**self.q-d**self.q)
        return score

    def test3(self):
        '''
        3、区间值直觉模糊集的度量方法（王 中兴 ，牛利利，2013年）
        :param IVq_ROF:
        :param q:
        :return:
        '''
        a = self.data[0][0]
        b = self.data[0][1]
        c = self.data[1][0]
        d = self.data[1][1]
        M_u = (a+b)/2.0
        M_v = (c+d)/2.0
        M_π = ((1-b-d)+(1-a-c))/2.0
        score = (M_u - M_v)*(1+M_π)
        return score

    def test4(self):
        '''
        4、徐泽水提出的区间值得分函数（2007）
        :param IVq_ROF:
        :param q:
        :return:
        '''
        a = self.data[0][0]
        b = self.data[0][1]
        c = self.data[1][0]
        d = self.data[1][1]
        score = (a-c+b-d/2)+1
        return score

    def test5(self):
        '''
        5、Chen提出的基于集合对分析理论的得分函数（2021）
        :param IVq_ROF:
        :param q:
        :return:
        '''
        a = self.data[0][0]
        b = self.data[0][1]
        c = self.data[1][0]
        d = self.data[1][1]
        if(a!=c):
            score =(a-c)*(1-b)
        else:
            score = a*(1+b)
        return score

    def test6(self):
        '''
        6、Chen S.M提出的得分函数（2017）
        :param IVq_ROF:
        :param q:
        :return:
        '''
        a = self.data[0][0]
        b = self.data[0][1]
        c = self.data[1][0]
        d = self.data[1][1]
        score = (a+b+math.sqrt(b*d)*(1-a-c)+math.sqrt(a*c)*(1-b-d))/2
        return score

    def test7(self):
        '''
        7、Chen S.M提出的区间值得分函数（2021）
        :param IVq_ROF:
        :param q:
        :return:
        '''
        a = self.data[0][0]
        b = self.data[0][1]
        c = self.data[1][0]
        d = self.data[1][1]
        temp = random.randint(0,1000000)
        if 0<= b+d <=1:
            temp = math.sqrt(a) + math.sqrt(b) + math.sqrt(1 - c) + math.sqrt(1 - d)
        score = temp / 2
        return score

    def E_T(self,L1, L2):
        '''
        test7中用到的定义函数
        :param L1: 左边界
        :param L2: 右边界
        :return:
        '''
        # alpha = get_Beta_random_number(loc=5, scale=1, N=50)
        # beta = get_Beta_random_number(loc=5, scale=1, N=50)
        # if (alpha > beta):
        #     t = alpha
        #     beta = alpha
        #     alpha = t
        beta = 0.9
        ans = L1 + (L2 - L1) * beta
        return ans
        # a = 1   # 阿尔法
        # B = 300   # 贝塔
        # ans = L1 + (L2 - L1) * (a / (a + B))
        # return ans

    def test8(self):
        '''
         8:Chen提出的基于Sin、Beta分布的得分函数（2021）
        :param IVq_ROF:
        :param q:
        :return:
        '''
        a = self.data[0][0]
        b = self.data[0][1]
        c = self.data[1][0]
        d = self.data[1][1]
        sF_g = (a - c + b - d) / 2 + 1
        sin1 = math.sin(self.E_T(a,b) * math.pi / 2)
        sin2 = math.sin(self.E_T(b,1-d) * math.pi / 2)
        sin3 = math.sin(self.E_T(1-d,1-c) * math.pi / 2)
        score = sF_g + sin1 + sin2 + sin3
        return score

    def test9(self):
        '''
        9:Sengupta, T.K. Pal提出的得分函数（2000年）
        :param IVq_ROF:
        :param q:
        :return:
        '''
        a = self.data[0][0]
        b = self.data[0][1]
        c = self.data[1][0]
        d = self.data[1][1]
        # if(a==c):
        #     score=1
        # elif(a>=c>=a+d):
        temp = random.randint(0,1000000)
        if((a-(a+c))!=0):
            temp = (c-(a+d))/(a-(a+c))
        score = max(0,temp)
        return score

    def test10(self):
        '''
        10:J.A.G. Campos,提出的Beta分布得分函数
        :param IVq_ROF:
        :param q:
        :return:
        '''
        a = self.data[0][0]
        b = self.data[0][1]
        c = self.data[1][0]
        d = self.data[1][1]
        aerfa = 2
        beita = 3
        score = a + (b - a) * (aerfa / (aerfa + beita))
        return score

    def test11(self):
        '''
        11.Cheng’s得分函数(2018)
        :param IVq_ROF:
        :param q:
        :return:
        '''
        a = self.data[0][0]
        b = self.data[0][1]
        c = self.data[1][0]
        d = self.data[1][1]
        score = (a - c + b - d) / 2 + 1
        return score

    def test12(self):
        '''
        12.ZY. Bai提出的区间值得分函数(2013)
        :param IVq_ROF:
        :param q:
        :return:
        '''
        a =self.data[0][0]
        b =self.data[0][1]
        c =self.data[1][0]
        d =self.data[1][1]
        temp = a + b + a * (1 - a - c )+ b * (1 - b - d)
        score = temp / 2
        return score

    def test13(self):
        '''
        13.Zhi-yong Bai 提出的得分函数（2013）
        14、基于trigonometric function的得分函数 少了关系式
        :param IVq_ROF:
        :param q:
        :return:
        '''
        a = self.data[0][0]
        b = self.data[0][1]
        c = self.data[1][0]
        d = self.data[1][1]
        temp = a + a * (1 - a - c) + b + b * (1 - b - d)
        score = temp / 2
        return score

    def test14(self):
        '''
        14:基于trigonometric function的得分函数
        :param IVq_ROF:
        :param q:
        :return:
        '''
        a = self.data[0][0]
        b = self.data[0][1]
        c = self.data[1][0]
        d = self.data[1][1]
        S_A = ((a-c+b-d)/2+1)/2
        E_A = b-a+d-c
        H_A = a+1-b+c+1-d
        temp1 = (math.sin(S_A)/math.sin(1))
        temp2 = (math.sin(H_A)/math.sin(1))
        temp3 = (math.cos(E_A)-math.cos(1))/(1-math.cos(1))
        score = (temp1*temp2*temp3)**(1/3)
        return score

    def test15(self):
        '''
        15、Minkowski Weighted Score Functions of Intuitionistic Fuzzy Values (2020)
        :param IVq_ROF:
        :param q:
        :return:
        '''
        a = self.data[0][0]
        b = self.data[0][1]
        c = self.data[1][0]
        d = self.data[1][1]
        p = 2
        tA = random.uniform(a,b)
        fA = random.uniform(c,d)
        score = ((tA ** p + (1 - fA) ** p) / 2 ) ** (1 / p)
        return score

    def test16(self):
        '''
        16:Gong and Ma’s score function of the IVIFS（2019）
        :param IVq_ROF:
        :param q:
        :return:
        '''
        a = self.data[0][0]
        b = self.data[0][1]
        c = self.data[1][0]
        d = self.data[1][1]
        add1 = (d + c - b - a) / 2
        if(a+b+c+d!=0):
            add2 = (a + b + 2 * (a * b - c * d)) / (a + b + c + d)
        score = add1 + add2
        return score

    def test17(self):
        '''
        17、Wang and Chen’s score function of the IVIFS（2018）
        :param IVq_ROF:
        :param q:
        :return:
        '''
        a = self.data[0][0]
        b = self.data[0][1]
        c = self.data[1][0]
        d = self.data[1][1]
        score = ((a+b)*(a+c) - (c+d)*(b+d)) / 2
        return score

    def test18(self):
        '''
        18、Sahin’s accuracy function of the IVIFS（2016）
        :param IVq_ROF:
        :param q:
        :return:
        '''
        a = self.data[0][0]
        b = self.data[0][1]
        c = self.data[1][0]
        d = self.data[1][1]
        score = (a+b*(1-a-c)+b+a*(1-b-d))/2
        return score

    def test19(self):
        '''
        19、Gao et al.’s score function of the IVIFS（2016）
        :param IVq_ROF:
        :param q:
        :return:
        '''
        a = self.data[0][0]
        b = self.data[0][1]
        c = self.data[1][0]
        d = self.data[1][1]
        score = random.randint(0,1000000)
        if((a+b-a*c+b*d)!=0):
            score = 1/4*(a-c+b-d)*(1+1/(a+b-a*c+b*d))
        return score

    def test20(self):
        '''
        20、Zhang and Xu’s accuracy function of the IVIFS
        :param IVq_ROF:
        :param q:
        :return:
        '''
        a = self.data[0][0]
        b = self.data[0][1]
        c = self.data[1][0]
        d = self.data[1][1]
        add1 = ((a-c)+(b-d)*(1-a-c))/2
        add2 = ((b-d)+(a-c)*(1-b-d))/2
        score = (add1+add2)/2
        return score

    def test21(self):
        '''
        21、彭新东提出的Information-based Score function（2020）
        :param IVq_ROF:
        :param q:
        :return:
        '''
        a = self.data[0][0]
        b = self.data[0][1]
        c = self.data[1][0]
        d = self.data[1][1]
        add1 = 1+a+b-c-d+0.5*(math.fabs(a-c)+math.fabs(b-d))
        add2 = (1+a+c)*(math.e**(a-c+a+b))/(math.e**3)+(1+b+d)*(math.e**(b-d-c-d))/math.e
        add3 = (2-c-d)/(4-a-b-c-d)
        score = add1 * add2 * add3 /16
        return score

    def test22(self):
        '''
        22、精确函数
        :param IVq_ROF:
        :param q:
        :return:
        '''
        a = self.data[0][0]
        b = self.data[0][1]
        c = self.data[1][0]
        d = self.data[1][1]
        score = a+b-1+(c+d)/2
        return score

    def test23(self):
        '''
        23、直觉的得分函数  需要a1=b1 c1=d1
        :param IFS: u,v
        :param q:
        :return:
        '''
        a1 = self.data[0][0][0]
        #b1 = IVq_ROF[0][0][1]
        c1 = self.data[0][1][0]
        #d1 = IVq_ROF[0][1][1]
        pai1 = 1-a1-c1

        a2 = self.data[1][0][0]
        #b2 = IVq_ROF[1][0][1]
        c2 = self.data[1][1][0]
        #d2 = IVq_ROF[1][1][1]
        pai2 = 1- a2 -c2

        x_avg = (a1-c1+a2-c2)/2
        y_avg = (a1+c1+a2+c2)/2

        if(a1-c1>=x_avg):
            v1_A_1 = (a1-c1-x_avg)**0.88
        else:
            v1_A_1 = -2.25*((x_avg-a1+c1)**0.88)

        if(a2-c2>=x_avg):
            v1_A_2 = (a2-c2-x_avg)**0.88
        else:
            v1_A_2 = -2.25*((x_avg-a2+c2)**0.88)

        if(a1-c1>=y_avg):
            v2_A_1 = (a1+c1-y_avg)**0.88
        else:
            v2_A_1 = -2.25*((y_avg-a1-c1)**0.88)

        if (a2 - c2 >= y_avg):
            v2_A_2 = (a2 + c2 - y_avg) ** 0.88
        else:
            v2_A_2 = -2.25 * ((y_avg - a2 - c2) ** 0.88)

        score1 = a1-c1+(a1-c1+v1_A_1+v2_A_1)*pai1
        score2 = a2-c2+(a2-c2+v1_A_2+v2_A_2)*pai2
        if(score1==score2):
            return 0
        else:
            return 1

        # a = IFS[0][0]
        # c = IFS[1][0]
        # x = a-c
        # y = a+c
        # v1_A = (a-c-x)**0.88
        # v2_A = (a+c-y)**0.88
        # score = a-c+(a-c+v1_A+v2_A)*math.pi
        # return score

    def test24(self):
        '''
        24、可能度得分（2016、2013等进行不同改进）
        :param IVq_ROF:
        :param q:
        :return:
        '''
        a = self.data[0][0]
        b = self.data[0][1]
        c = self.data[1][0]
        d = self.data[1][1]
        temp = (d-a)/(c-a+d-b)
        score = max(1-max(temp,0),0)
        return score


    def test25(self):
        '''
        25、prospect score functio（2012）
        :param IVq_ROF:
        :param q:
        :return:
        '''
        a = self.data[0][0]
        b = self.data[0][1]
        c = self.data[1][0]
        d = self.data[1][1]
        e = (1-a**self.q-c**self.q)**(1/self.q)
        f = (1-b**self.q-d**self.q)**(1/self.q)
        aerfa = 0.88
        mi_u = a+b
        ni_u = b-a
        mi_v = c+d
        ni_v = d-c
        x = (mi_u*(1-ni_u)-mi_v*(1-ni_v))/(2-ni_u-ni_v)
        y = (mi_u*(1-ni_u)-mi_v*(1-ni_v))/(2-ni_u-ni_v)
        v1_A = (((mi_u*(1-ni_u)-mi_v*(1-ni_v))/(2-ni_u-ni_v))-x)**aerfa
        v2_A = (((mi_u * (1 - ni_u) - mi_v * (1 - ni_v)) / (2 - ni_u - ni_v)) - x) ** aerfa
        score = a-c+b-d +(a-c+b-d+v1_A+v2_A*(f-e))
        return score

    def test26(self):
        '''
        26、knowledge measure，Entropy（2020）
        :param IVq_ROF:
        :param q:
        :return:
        '''
        # a=u c=v
        a = self.data[0][0]
        c = self.data[1][0]
        p = 1
        KF_A = 1/(2**(1/p)+1)*((a**p+c**p+(a+c)**p)**(1/p)+math.fabs(a**p-c**p)**(1/p))
        C = 500
        SF_A = (math.e**(C*(a-c))-1)/(math.e**(C*(a-c))+1)*KF_A
        score = SF_A
        return score

    def test26_2(self):
        '''
        26、knowledge measure，Entropy（2020）
        :param IVq_ROF:
        :param q:
        :return:
        '''
        # a=u c=v
        a = self.data[0][0]
        b = self.data[0][1]
        c = self.data[1][0]
        d = self.data[1][1]
        p = 1
        sum1 = (a**p + b**p + c**p + d**p)/2
        sum2 = ((a+c)**p+(b+d)**p)/2
        sum3 = (b**p-d**p+a**p-c**p)/2
        KF_A = 1/(2**(1/p)+1)*((sum1+sum2)**(1/p)+math.fabs(sum3)**(1/p))
        C = 500
        SF_A = (math.e**(C*(b-d+a-c)/2)-1)/(math.e**(C*(b-d+a-c)/2)+1)*KF_A
        score = SF_A
        return score

    def test27(self):
        '''
        27、a better score function
        :param IVq_ROF:
        :param q:
        :return:
        '''
        a = self.data[0][0]
        b = self.data[0][1]
        c = self.data[1][0]
        d = self.data[1][1]
        sum = a + b +(1-math.sqrt(c))**2+(1-math.sqrt(d))**2
        divide = 6-math.sqrt(c)-math.sqrt(d)-math.sqrt(a)-math.sqrt(b)
        score = sum/divide
        return score

    def test28(self):
        '''
        28、Dü˘genci’s Measure Measure-Based Method（2014）
        :param IVq_ROF:
        :param q:
        :return:
        '''
        a1 = self.data[0][0][0]
        b1 = self.data[0][0][1]
        c1 = self.data[0][1][0]
        d1 = self.data[0][1][1]

        a2 = self.data[1][0][0]
        b2 = self.data[1][0][1]
        c2 = self.data[1][1][0]
        d2 = self.data[1][1][1]

        t,p=2,1
        sum1 = (math.fabs(t*(a1-a2)-(c1-c2)))**p
        sum2 = (math.fabs(t*(c1-c2)-(a1-a2)))**p
        sum3 = (math.fabs(t*(b1-b2)-(d1-d2)))**p
        sum4 = (math.fabs(t*(d1-d2)-(b1-b2)))**p
        temp = 1/4/((1+t)**p)
        score = temp*((sum1+sum2+sum3+sum4)**(1/p))
        return score

        # a = IVq_ROF[0][0]
        # b = IVq_ROF[0][1]
        # c = IVq_ROF[1][0]
        # d = IVq_ROF[1][1]
        #
        # a2 = IVq_ROF[2][0]
        # b2 = IVq_ROF[2][1]
        # c2 = IVq_ROF[3][0]
        # d2 = IVq_ROF[3][1]
        # print("C2,D2")
        # print(c2,d2)
        # t = 2
        # p = 1
        # temp1 = 1/4/((1+t)**p)
        # sum1 = math.fabs(t*(a-b)-(c-d))
        # sum2 = math.fabs(t*(c-d)-(a-b))
        # sum3 = math.fabs(t*(a-b)-(c-d))
        # sum4 = math.fabs(t*(c-d)-(a-b))
        # score = temp1*((sum1**p+sum2**p+sum3**p+sum4**p))**(1/p)
        # return score



    def test29(self):
        '''
        29、Zhang et al.’s [13] Entropy Measures for IvIFSs:
        :param IVq_ROF:
        :param q:
        :return:
        '''
        a = self.data[0][0]
        b = self.data[0][1]
        c = self.data[1][0]
        d = self.data[1][1]
        temp1 = (a-c)
        temp2 = (b-d)
        if(max(temp1,temp2)<0):
            score = random.randint(1,100000)
        else:
            score = 1/2*(1-math.sqrt(max(temp1,temp2)))
        return score

    def test30(self):
        '''
        30、N. Thillaigovindan, S. Anita Shanthi, J. Vadivel Naidu（2016）
        :param IVq_ROF:
        :param q:
        :return:
        '''
        a = self.data[0][0]
        b = self.data[0][1]
        c = self.data[1][0]
        d = self.data[1][1]
        sum = a +b+(1-math.sqrt(c))**2+(1-math.sqrt(d))**2
        pai_fu = (1-math.sqrt(a)-math.sqrt(c))**2
        pai_zheng = (1-math.sqrt(b)-math.sqrt(d))**2
        divide = 4+math.sqrt(pai_fu)+math.sqrt(pai_zheng)
        score = sum/divide
        return score

    def test31(self):
        '''
        31、Ye（2009）
        :param IVq_ROF:
        :param q:
        :return:
        '''
        a = self.data[0][0]
        b = self.data[0][1]
        c = self.data[1][0]
        d = self.data[1][1]
        e = (1 - a ** self.q - c ** self.q) ** (1 / self.q)
        f = (1 - b ** self.q - d ** self.q) ** (1 / self.q)
        score = (a-e+b-f)/2
        return score

    def test32(self):
        '''
        32、Nayagam(2011)
        :param IVq_ROF:
        :param q:
        :return:
        '''
        a = self.data[0][0]
        b = self.data[0][1]
        c = self.data[1][0]
        d = self.data[1][1]
        score = ((a-d*(1-b))+b-c*(1-a))/2
        return score

    def test33(self):
        '''
        33、Gao and Liu (2015)
        :param IVq_ROF:
        :param q:
        :return:
        '''
        a = self.data[0][0]
        b = self.data[0][1]
        c = self.data[1][0]
        d = self.data[1][1]
        e = (1 - a ** self.q - c ** self.q) ** (1 / self.q)
        f = (1 - b ** self.q - d ** self.q) ** (1 / self.q)
        score = (a+b-c-d+2)/(e+f+4)
        return score

    def test34(self):
        '''
        34、Sabin(2015)
        :param IVq_ROF:
        :param q:
        :return:
        '''
        a = self.data[0][0]
        b = self.data[0][1]
        c = self.data[1][0]
        d = self.data[1][1]
        e = (1 - a ** self.q - c ** self.q) ** (1 / self.q)
        f = (1 - b ** self.q - d ** self.q) ** (1 / self.q)
        score = (a+b*e+b+a*f)/2
        return score

    def test35_a(self):
        '''
        a:Ye,2010
        :param IVq_ROF:
        :param q:
        :return:
        '''
        a = self.data[0][0]
        b = self.data[0][1]
        c = self.data[1][0]
        d = self.data[1][1]
        score = (1/(math.sqrt(2)-1))*(math.sqrt(2)*math.cos((a+b-c-d)/8)*math.pi-1)
        return score

    def test35_b(self):
        '''
        b:Zhang et al,2010
        :param IVq_ROF:
        :param q:
        :return:
        '''
        a = self.data[0][0]
        b = self.data[0][1]
        c = self.data[1][0]
        d = self.data[1][1]
        up = min(a,c)+min(b,d)
        divided = max(a,c)+max(b,d)
        score = up/divided
        return score

    def test35_c(self):
        '''
        c:wei et al,2011
        :param IVq_ROF:
        :param q:
        :return:
        '''
        a = self.data[0][0]
        b = self.data[0][1]
        c = self.data[1][0]
        d = self.data[1][1]
        e = (1 - a ** self.q - c ** self.q) ** (1 / self.q)
        f = (1 - b ** self.q - d ** self.q) ** (1 / self.q)
        up = min(a, c) + min(b, d)+e+f
        divided = max(a, c) + max(b, d)+e+f
        score = up/divided
        return score

    def test35_d(self):
        '''
        d:zhang at al,2011
        :param IVq_ROF:
        :param q:
        :return:
        '''
        a = self.data[0][0]
        b = self.data[0][1]
        c = self.data[1][0]
        d = self.data[1][1]
        t =0.5
        Ma = a + t*(b-a)
        Na = c + t*(d-c)
        score = (1-Ma+Na)*(math.e**(1-Ma+Na))
        return score

    def test35_e(self):
        '''
        e:Sun and Liu,2012
        :param IVq_ROF:
        :param q:
        :return:
        '''
        a =self.data[0][0]
        b =self.data[0][1]
        c =self.data[1][0]
        d =self.data[1][1]
        e = (1 - a ** self.q - c ** self.q) ** (1 / self.q)
        f = (1 - b ** self.q - d ** self.q) ** (1 / self.q)
        up =math.fabs(a-c)+math.fabs(b-d)
        divided = 2+f+e+min(a+b,c+d)
        score = 1-up/divided
        return score

    def test35_f(self):
        '''
        f:Chen et al,2013
        :param IVq_ROF:
        :param q:
        :return:
        '''
        a = self.data[0][0]
        b = self.data[0][1]
        c = self.data[1][0]
        d = self.data[1][1]
        up = math.fabs(a-c+b-d)
        divided = 4-a-c-b-d
        score = 1/math.tan(math.pi/4+up/4/divided*math.pi)
        return score

    def test35_g(self):
        '''
        g:Jing,2013
        :param IVq_ROF:
        :param q:
        :return:
        '''
        a = self.data[0][0]
        b = self.data[0][1]
        c = self.data[1][0]
        d = self.data[1][1]
        e = (1 - a ** self.q - c ** self.q) ** (1 / self.q)
        f = (1 - b ** self.q - d ** self.q) ** (1 / self.q)
        up = 2+e+f-math.fabs(a-c)-math.fabs(b-d)
        divided = 2+e+f
        score = up/divided
        return score

    def test35_h(self):
        '''
        h:Zhang et al,2014
        :param IVq_ROF:
        :param q:
        :return:
        '''
        a = self.data[0][0]
        b = self.data[0][1]
        c = self.data[1][0]
        d = self.data[1][1]
        score = 1-1/2*(math.fabs(b-0.5)+math.fabs(a-0.5)+math.fabs(d-0.5)+math.fabs(c-0.5))
        return score

    def test35_i(self):
        '''
        i:Wei and Zhang,2015
        :param IVq_ROF:
        :param q:
        :return:
        '''
        a = self.data[0][0]
        b = self.data[0][1]
        c = self.data[1][0]
        d = self.data[1][1]
        pai1 = (1 - a ** self.q - c ** self.q) ** (1 / self.q)
        pai2 = (1 - b ** self.q - d ** self.q) ** (1 / self.q)
        up = math.fabs(a-c)+math.fabs(b-d)
        divided = 2*(2+pai2+pai1)
        score = math.cos(up/divided*math.pi)
        return score

    def test36(self):
        '''
        36、Hoang  Nguye(2015)
        :param IVq_ROF:
        :param q:
        :return:
        '''
        # a=b=u c=d=v
        a = self.data[0][0]
        b = self.data[0][1]
        c = self.data[1][0]
        d = self.data[1][1]
        #score = 1/(2*math.sqrt(2))*math.sqrt(a**2+b**2+c**2+d**2+(a+b)**2+(c+d)**2)
        score = 1/math.sqrt(2)*math.sqrt(a**2+c**2+(a+c)**2)
        return score

    def test37(self):
        '''
        37、Hoang Nguyen（2016）基于36个得分函数提出的（pass）
        :param IVq_ROF:
        :param q:
        :return:
        '''
        a = self.data[0][0]
        b = self.data[0][1]
        c = self.data[1][0]
        d = self.data[1][1]
        score = 1-2*math.fabs(2*a-0.5)
        return score


    def test38(self):
        '''
        38、YingJun Zhang（2011）
        :param IVq_ROF:
        :param q:
        :return:
        '''
        # a=b=u c=d=v
        a = self.data[0][0]
        b = self.data[0][1]
        c = self.data[1][0]
        d = self.data[1][1]
        score = (1-a-c)*(math.e**(1-a-c))
        # score = 1-(a+d)*(math.e**1-(a+d))
        return score

    def test39(self):
        '''
        39、Kaihong Guo（2018）
        :param IVq_ROF:
        :param q:
        :return:
        '''
        a = self.data[0][0]
        b = self.data[0][1]
        c = self.data[1][0]
        d = self.data[1][1]
        e = (1 - a ** self.q - c ** self.q) ** (1 / self.q)
        f = (1 - b ** self.q - d ** self.q) ** (1 / self.q)
        score = 1 - 1/2*(1-math.fabs(a-c)/2+math.fabs(b-d))*(1+1/2*(e+f))
        return score

    def test40(self):
        '''
        40、Liu [14] dealt with the abstention group influence
        :param IFS:
        :param q:
        :return:
        '''
        # a=b=u c=d=v
        a = self.data[0][0]
        b = self.data[0][1]
        c = self.data[1][0]
        d = self.data[1][1]
        # score = a+a*(1-a-c)+c+c*(1-b-d)
        score = a+a*(1-a-c)
        return score

    def test41(self):
        '''
        41、Liu and Wang（分解成n等分）
        :param IVq_ROF:
        :param q:
        :return:
        '''
        a = self.data[0][0]
        b = self.data[0][1]
        c = self.data[1][0]
        d = self.data[1][1]
        # pai1 = (1 - a ** q - c ** q) ** (1 / q)
        # pai2 = (1 - b ** q - d ** q) ** (1 / q)
        # aerfa = 0.1
        # beita = 0.5
        # score = a+(aerfa/(aerfa+beita))*pai1+c+(aerfa/(aerfa+beita))*pai2
        pai = 1-a-c
        aerfa = 0.1
        beita = 0.1
        score = a+aerfa*pai/(aerfa+beita)
        return score

    def test42(self):
        '''
        42、 Zhou and Wu [22] divided the abstention group
        :param IVq_ROF:
        :param q:
        :return:
        '''
        a = self.data[0][0]
        b = self.data[0][1]
        c = self.data[1][0]
        d = self.data[1][1]
        # pai1 = (1 - a ** q - c ** q) ** (1 / q)
        # pai2 = (1 - b ** q - d ** q) ** (1 / q)
        # aerfa = 0.1
        # beita = 0.5
        # score = a-b+(aerfa-beita)*pai1+c-d+(aerfa-beita)*pai2
        pai = 1-a-c
        aerfa=0.1
        beita=0.5
        score = a-c+(aerfa-beita)*pai
        return score

    def test43(self):
        '''
        43、Lin et al. [23] introduced a new method:
        :param IVq_ROF:
        :param q:
        :return:
        '''
        # a=b=u c=d=v
        a = self.data[0][0]
        b = self.data[0][1]
        c = self.data[1][0]
        d = self.data[1][1]
        # score = 2*a+b-1+2*c+d-1
        score = 2*a+c-1
        return score

    def test44(self):
        '''
        44、Lin et al. [16] introduced a new score function
        :param IVq_ROF:
        :param q:
        :return:
        '''
        a = self.data[0][0]
        b = self.data[0][1]
        c = self.data[1][0]
        d = self.data[1][1]
        # a=b=u c=d=v
        pai = 1-a-c
        # pai1 = (1 - a ** q - c ** q) ** (1 / q)
        # pai2 = (1 - b ** q - d ** q) ** (1 / q)
        #score = 1/2*(a+c)+3/2*(1-pai1+1-pai2)-2
        score = a/2+3/2*(1-pai)-1
        return score

    def test45(self):
        '''
        45、Ye [25] introduced an improved score function:
        :param IVq_ROF:
        :param q:
        :return:
        '''
        # a=b=u c=d=v
        a = self.data[0][0]
        b = self.data[0][1]
        c = self.data[1][0]
        d = self.data[1][1]
        # score = a-c+b-d+a*(1-a-b)+c*(1-c-d)
        miu = 0.1   # 随机赋个值
        score = a-c+miu*(1-a-c)
        return score


    def test46(self):
        '''
        46、, Ye [26] introduced another improved score function
        :param IVq_ROF:
        :param q:
        :return:
        '''
        # a=b=u c=d=v
        a = self.data[0][0]
        b = self.data[0][1]
        c = self.data[1][0]
        d = self.data[1][1]
        pai = 1-a-c
        score = a*(1+pai)-pai**2
        return score


    def test47(self):
        '''
        47、Wang and Li [18] introduced a new score function
        :param IVq_ROF:
        :param q:
        :return:
        '''
        pass

    def test48(self):
        '''
        48、Prospect theory score function
        :param IVq_ROF:
        :param q:
        :return:
        '''
        # a=b=u  c=d=v
        a = self.data[0][0]
        b = self.data[0][1]
        c = self.data[1][0]
        d = self.data[1][1]
        pai = 1-a-c
        x_avg = a-c
        y_avg = a+c
        aerfa = 1
        namuda = 1
        if(a-c>=x_avg):
            v1_A = (a-c-x_avg)**aerfa
        else:
            v1_A = -namuda*((x_avg-(a-c))**aerfa)

        if(a-c>=y_avg):
            v2_A = (a+c-y_avg)**aerfa
        else:
            v2_A = -namuda*((y_avg-(a+c))**aerfa)
        score = a-c+(a-c+v1_A+v2_A)*pai
        # x_avg = 1/2*(a-b+c-d)
        # y_avg = 1/2*(a+b+c+d)
        # aerfa = 1
        # k = 1
        # if(a-b>=x_avg):
        #     v1_A_1 = (a-b-x_avg)**aerfa
        # else:
        #     v1_A_1 = -k * ((x_avg - (a - b)) ** aerfa)
        # if(c-d>=x_avg):
        #     v1_A_2 = (c - d - x_avg) ** aerfa
        # else:
        #     v1_A_2 = -k * ((x_avg - (c - d)) ** aerfa)
        # if(a-b>=y_avg):
        #     v2_A_1 = (a+b-y_avg)**aerfa
        # else:
        #     v2_A_1 = -k * ((y_avg - (a + b)) * aerfa)
        # if (c-d >= y_avg):
        #     v2_A_2 = (c + d - y_avg) ** aerfa
        # else:
        #     v2_A_2 = -k * ((y_avg - (c + d)) * aerfa)
        # score = a-b+(a-b+v1_A_1+v2_A_1)*pai1+c-d+(c-d+v1_A_2+v2_A_2)*pai2
        return score

    def test49(self):
        '''
        49、Wang(2006)
        :param IVq_ROF:
        :param q:
        :return:
        '''
        a = self.data[0][0]
        b = self.data[0][1]
        c = self.data[1][0]
        d = self.data[1][1]
        # score = (3*a+3*b-c-d-1)/2
        score = (3*a-c-1)/2
        return score

    def test50(self):
        '''
        50 Thillaigovindan
        :param IVq_ROF:
        :param q:
        :return:
        '''
        a = self.data[0][0]
        b = self.data[0][1]
        c = self.data[1][0]
        d = self.data[1][1]
        sum = a+b+(1-math.sqrt(c))**2+(1-math.sqrt(d))**2
        divide = 6-math.sqrt(c)-math.sqrt(d)-math.sqrt(a)-math.sqrt(b)
        score = sum/divide
        return score

    def test51(self):
        '''
        51、Dugenci’s  少了t和p
        :param IVq_ROF:
        :param q:
        :return:
        '''
        a1 = self.data[0][0][0]
        # b1 = IVq_ROF[0][0][1]
        c1 = self.data[0][1][0]
        # d1 = IVq_ROF[0][1][1]
        pai1 = 1 - a1 - c1

        a2 = self.data[1][0][0]
        # b2 = IVq_ROF[1][0][1]
        c2 = self.data[1][1][0]
        # d2 = IVq_ROF[1][1][1]
        pai2 = 1 - a2 - c2
        t,p=2,1

        score = ((0.5/((1+t)**p))*(math.fabs(t*(a1-a2)-c1-c2)**p+math.fabs(t*(c1-c2)-(a1-a2))**p))**(1/p)
        return score
        # a = IVq_ROF[0][0]
        # b = IVq_ROF[0][1]
        # c = IVq_ROF[1][0]
        # d = IVq_ROF[1][1]
        # t = 1
        # p = 1
        # score = ((0.5/((1+t)**p))*(math.fabs(t*(a-b)-c-d)**p+math.fabs(t*(c-d)-(a-b))**p))**(1/p)
        # return score

    def get_e(self,times):
        factorial=[1]
        sum = 1
        # 求和1/n!
        for i in range(1, times+1):
            temp = factorial[i]
            sum += 1 / temp
        return sum

    def get_alpha_beta(self,left,right):
        avg = (right-left)/2
        avg = round(avg,2)
        alpha = avg*100
        beta = 100-alpha
        alpha = alpha*3
        beta = beta*3
        return alpha,beta

    def get_score(self,left,right):
        score = 0
        # if(left==0 and right==0):
        #     return 0
        # elif(left==1 and right==1):
        #     return 1
        # elif(left==right):
        #     x=[]
        #     for i in range(100):
        #         x.append(left)
        #     aerfa, beita = get_alpha_beta(left, right)
        #     for i in range(100):
        #         score += get_e(i) / math.e * beta.pdf(x, aerfa, beita)[i]
        #     return score
        if left == right:
            return left
        else:
            aerfa,beita = self.get_alpha_beta(left,right)
            spacing = (right-left)/100
            x = np.arange(left, right, spacing)  # 给定的输入数据 [0.0-1]
            for i in range(100):
                score += self.get_e(i) / math.e * beta.pdf(x, aerfa, beita)[i]
            return score



    def score_exactvalue2(self):
        '''

        :param i:广义正交数
        :prem q:
        :return: 得分,精确值
        '''
        score = 1 / 2 *       (self.data[0][0] ** self.q + self.data[0][1] ** self.q - self.data[1][0] ** self.q - self.data[1][1] ** self.q)  # 得分函数
        exact_value = 1 / 2 * (self.data[0][0] ** self.q + self.data[0][1] ** self.q + self.data[1][0] ** self.q + self.data[1][1] ** self.q)  # 精确值函数

        return score, exact_value

if __name__=='__main__':
    data = [
    [   # EX 1
        [([0.83618, 0.91809], [0.08191, 0.16382]), ([0.31409, 0.42606], [0.57394, 0.68591]), ([0.35865, 0.45865], [0.54135, 0.64135]), ([0.31958, 0.42972], [0.57028, 0.68042]), ([0.82832, 0.91416], [0.08584, 0.17168])],
        [([0.15235, 0.27852], [0.72148, 0.84765]), ([0.58754, 0.70631], [0.29369, 0.41246]), ([0.38481, 0.48481], [0.51519, 0.61519]), ([0.47759, 0.57759], [0.42241, 0.52241]), ([0.22139, 0.36426], [0.63574, 0.77861])],
        [([0.33162, 0.43775], [0.56225, 0.66838]), ([0.24469, 0.37979], [0.62021, 0.75531]), ([0.3575, 0.4575], [0.5425, 0.6425]), ([0.45444, 0.55444], [0.44556, 0.54556]), ([0.54304, 0.64304], [0.35696, 0.45696])],
        [([0.25124, 0.38416], [0.61584, 0.74876]), ([0.51559, 0.61559], [0.38441, 0.48441]), ([0.69767, 0.83178], [0.16822, 0.30233]), ([0.4922, 0.5922], [0.4078, 0.5078]), ([0.34315, 0.44543], [0.55457, 0.65685])],
        [([0.80312, 0.90156], [0.09844, 0.19688]), ([0.54141, 0.64141], [0.35859, 0.45859]), ([0.36238, 0.46238], [0.53762, 0.63762]), ([0.55207, 0.65311], [0.34689, 0.44793]), ([0.21361, 0.35907], [0.64093, 0.78639])]
    ],
    [   # EX 2
        [([0.83618, 0.91809], [0.08191, 0.16382]), ([0.31409, 0.42606], [0.57394, 0.68591]), ([0.35865, 0.45865], [0.54135, 0.64135]), ([0.31958, 0.42972], [0.57028, 0.68042]), ([0.82832, 0.91416], [0.08584, 0.17168])],
        [([0.15235, 0.27852], [0.72148, 0.84765]), ([0.58754, 0.70631], [0.29369, 0.41246]), ([0.38481, 0.48481], [0.51519, 0.61519]), ([0.47759, 0.57759], [0.42241, 0.52241]), ([0.22139, 0.36426], [0.63574, 0.77861])],
        [([0.33162, 0.43775], [0.56225, 0.66838]), ([0.24469, 0.37979], [0.62021, 0.75531]), ([0.3575, 0.4575], [0.5425, 0.6425]), ([0.45444, 0.55444], [0.44556, 0.54556]), ([0.54304, 0.64304], [0.35696, 0.45696])],
        [([0.25124, 0.38416], [0.61584, 0.74876]), ([0.51559, 0.61559], [0.38441, 0.48441]), ([0.69767, 0.83178], [0.16822, 0.30233]), ([0.4922, 0.5922], [0.4078, 0.5078]), ([0.34315, 0.44543], [0.55457, 0.65685])],
        [([0.80312, 0.90156], [0.09844, 0.19688]), ([0.54141, 0.64141], [0.35859, 0.45859]), ([0.36238, 0.46238], [0.53762, 0.63762]), ([0.55207, 0.65311], [0.34689, 0.44793]), ([0.21361, 0.35907], [0.64093, 0.78639])]
    ],
    [   # EX 3
        [([0.43425, 0.53425], [0.46575, 0.56575]), ([0.88039, 0.94019], [0.05981, 0.11961]), ([0.41447, 0.51447], [0.48553, 0.58553]), ([0.4476, 0.5476], [0.4524, 0.5524]), ([0.18896, 0.33344], [0.66656, 0.81104])],
        [([0.70605, 0.83737], [0.16263, 0.29395]), ([0.5571, 0.66065], [0.33935, 0.4429]), ([0.37665, 0.47665], [0.52335, 0.62335]), ([0.36623, 0.46623], [0.53377, 0.63377]), ([0.06355, 0.1595], [0.8405, 0.93645])],
        [([0.1557, 0.28356], [0.71644, 0.8443]), ([0.36183, 0.46183], [0.53817, 0.63817]), ([0.27234, 0.39823], [0.60177, 0.72766]), ([0.65971, 0.80647], [0.19353, 0.34029]), ([0.75115, 0.86743], [0.13257, 0.24885])],
        [([0.39504, 0.49504], [0.50496, 0.60496]), ([0.39674, 0.49674], [0.50326, 0.60326]), ([0.64697, 0.79545], [0.20455, 0.35303]), ([0.37263, 0.47263], [0.52737, 0.62737]), ([0.41857, 0.51857], [0.48143, 0.58143])],
        [([0.6117, 0.74255], [0.25745, 0.3883]), ([0.62751, 0.76626], [0.23374, 0.37249]), ([0.57758, 0.69137], [0.30863, 0.42242]), ([0.34754, 0.44836], [0.55164, 0.65246]), ([0.5088, 0.6088], [0.3912, 0.4912])]
    ],
    [   # EX 4
        [([0.84547, 0.92273], [0.07727, 0.15453]), ([0.144, 0.266], [0.734, 0.856]), ([0.95, 0.99], [0.01, 0.05]), ([0.65754, 0.80502], [0.19498, 0.34246]), ([0.84036, 0.92018], [0.07982, 0.15964])],
        [([0.42873, 0.52873], [0.47127, 0.57127]), ([0.13042, 0.24562], [0.75438, 0.86958]), ([0.78335, 0.8889], [0.1111, 0.21665]), ([0.92359, 0.96887], [0.03113, 0.07641]), ([0.05902, 0.15447], [0.84553, 0.94098])],
        [([0.6474, 0.7961], [0.2039, 0.3526]), ([0.76209, 0.87472], [0.12528, 0.23791]), ([0.41213, 0.51213], [0.48787, 0.58787]), ([0.41519, 0.51519], [0.48481, 0.58481]), ([0.56539, 0.67308], [0.32692, 0.43461])],
        [([0.22797, 0.36864], [0.63136, 0.77203]), ([0.85487, 0.92744], [0.07256, 0.14513]), ([0.43941, 0.53941], [0.46059, 0.56059]), ([0.131, 0.24649], [0.75351, 0.869]), ([0.27968, 0.40312], [0.59688, 0.72032])],
        [([0.54231, 0.64231], [0.35769, 0.45769]), ([0.37227, 0.47227], [0.52773, 0.62773]), ([0.38045, 0.48045], [0.51955, 0.61955]), ([0.52091, 0.62091], [0.37909, 0.47909]), ([0.14078, 0.26117], [0.73883, 0.85922])],
    ],
    [   # EX 5
        [([0.35428, 0.45428], [0.54572, 0.64572]), ([0.0765, 0.17389], [0.82611, 0.9235]), ([0.77216, 0.88144], [0.11856, 0.22784]), ([0.4368, 0.5368], [0.4632, 0.5632]), ([0.7187, 0.8458], [0.1542, 0.2813])],
        [([0.32921, 0.43614], [0.56386, 0.67079]), ([0.43519, 0.53519], [0.46481, 0.56481]), ([0.41521, 0.51521], [0.48479, 0.58479]), ([0.50738, 0.60738], [0.39262, 0.49262]), ([0.56076, 0.66615], [0.33385, 0.43924])],
        [([0.25606, 0.38737], [0.61263, 0.74394]), ([0.26822, 0.39548], [0.60452, 0.73178]), ([0.52524, 0.62524], [0.37476, 0.47476]), ([0.45266, 0.55266], [0.44734, 0.54734]), ([0.62829, 0.76744], [0.23256, 0.37171])],
        [([0.37453, 0.47453], [0.52547, 0.62547]), ([0.14183, 0.26274], [0.73726, 0.85817]), ([0.41044, 0.51044], [0.48956, 0.58956]), ([0.51452, 0.61452], [0.38548, 0.48548]), ([0.53993, 0.63993], [0.36007, 0.46007])],
        [([0.46419, 0.56419], [0.43581, 0.53581]), ([0.45675, 0.55675], [0.44325, 0.54325]), ([0.76914, 0.87942], [0.12058, 0.23086]), ([0.66814, 0.81209], [0.18791, 0.33186]), ([0.52111, 0.62111], [0.37889, 0.47889])]
    ]
]
    # listt=[]
    # for i in data:
    #     lis=[]
    #     for j in i:
    #         li=[]
    #         for k in j:
    #             li.append(getS(k,3).getScore())
    #         lis.append(li)
    #     listt.append(lis)
    # for i in listt:
    #     print(i)
    li=[[0.676778370143161, -0.20171725871805501, -0.13991984907074997, -0.19424505181604002, 0.6632911793136638],
 [-0.47972900555291703, 0.22983968194465493, -0.09931693059271803, 0.04184085346295803, -0.334890248961605],
 [-0.177987602833097, -0.30001900968155204, -0.14172040624999993, 0.006726775056767997, 0.14256639065292798],
 [-0.29039809731808, 0.09993319266975798, 0.441332813046415, 0.06408330289599998, -0.16258631472311802],
 [0.6211129154477438, 0.14001375518044198, -0.134089663813456, 0.15761548412997395, -0.3467785359434761]]

    li2=[[0.676778370143161, -0.20171725871805501, -0.13991984907074997, -0.19424505181604002, 0.6632911793136638],
 [-0.47972900555291703, 0.22983968194465493, -0.09931693059271803, 0.04184085346295803, -0.334890248961605],
 [-0.177987602833097, -0.30001900968155204, -0.14172040624999993, 0.006726775056767997, 0.14256639065292798],
 [-0.29039809731808, 0.09993319266975798, 0.441332813046415, 0.06408330289599998, -0.16258631472311802],
 [0.6211129154477438, 0.14001375518044198, -0.134089663813456, 0.15761548412997395, -0.3467785359434761]]
    li3=[[-0.02386906396874998, 0.755770521112178, -0.053917654786754005, -0.0036360276480000148, -0.39291258544128],
 [0.45471213599167787, 0.167644792485625, -0.11191452864074997, -0.12808724735726595, -0.705328905686125],
 [-0.471508586764984, -0.13494840814902603, -0.259925952766329, 0.382493613993634, 0.5293814338602819],
 [-0.08359642452787201, -0.08099105757195202, 0.36077961664049807, -0.118141841729106, -0.04767854593041401],
 [0.2813505069943751, 0.316276999243127, 0.20918787076786502, -0.15675649595788005, 0.08948859494400001]]
    li4=[[0.6929238059857401, -0.50043092, 0.9137740000000001, 0.37920816874707197, 0.684017277068488],
 [-0.032243295644765975, -0.5349114240575841, 0.5857553688643751, 0.8484250612603821, -0.7168901182995691],
 [0.36178815410500004, 0.5482271064253771, -0.05748167152880602, -0.05282151106728202, 0.18431700125093095],
 [-0.324939483153883, 0.709517648613087, -0.016046225296758032, -0.533418317318551, -0.24950382156543996],
 [0.14142282214678203, -0.11870023199783403, -0.10604110486775001, 0.10814175330914196, -0.5085137006038349]]
    li5=[[-0.14676983423449597, -0.672844236790131, 0.5658573561036799, -0.020002599935999996, 0.47518530111499996],
 [-0.181229739224495, -0.022443646735281986, -0.052791065742478036, 0.08730854321454402, 0.17499351981535102],
 [-0.283372339923431, -0.26581849930115997, 0.11484047594764804, 0.004029937642192019, 0.31803735803757305],
 [-0.11519676211264598, -0.505876519584689, -0.06005722229363198, 0.09828497163481595, 0.13769855064531406],
 [0.021503564486117996, 0.010226865093749982, 0.5605366437408321, 0.39532361442347297, 0.108450804217262]]


